#ifndef __NAND_FLASH_H__
#define __NAND_FLASH_H__

#include "cpu_io.h"
#include "stm32f10x_lib.h"


//-------------------------------------------------------------------------
//External Functions
//-------------------------------------------------------------------------
void K9F1208_nand_Init(void);
int K9F1208_nand_Identify(void);
int K9F1208_nand_ReadPage(U32 *pPage, void *pBuf, U32 *pDataEcc, U8 nand_ecc);
int K9F1208_nand_ProgData(U32 *pPage, const void *pBuf, U32 *pDataEcc, U8 nand_ecc);
int K9F1208_nand_ProgHalfDouble(U32 *pPage, const void *pBuf0, const void *pBuf1, U32 *pDataEcc, U8 nand_ecc);
int K9F1208_nand_ProgSpare(U32 *pPage, const void *pBuf);
int K9F1208_nand_EraseBlock(U32 *pPage);



#endif

